package 每日练习;

import java.util.Scanner;

public class text11 {
    public static void main(String[] args)
    {
        //2.求商和余数，不能用/和%
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入被除数:");
        int a = sc.nextInt();
        System.out.println("请输入除数:");
        int b = sc.nextInt();

        int count = 0;
        while(a >= b)
        {
            a -=b;
            count++;
        }
        System.out.println("商为:"+count);
        System.out.println("余数为:"+a);
    }
}
